<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
  </el-config-provider>
</template>

<script setup lang="ts">
import { registerMicroApps, start } from "qiankun";
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { ref } from 'vue'
import actions from "./actions";
import apps from "./micro-app";
const locale = ref(zhCn)

// 监听qiankun全局state内的数据改变  第二参数为true表示立即监听
actions.onGlobalStateChange((state) => {
  console.log("qiankun全局state改变", state);
}, true);
// 注册
registerMicroApps(apps);

</script>

<style scoped lang="scss">
</style>